package org.codeart.map.controller;

import org.codeart.common.response.TraceResponse;
import org.codeart.common.util.R;
import org.codeart.map.service.TraceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/trace")
public class TraceController {
    
    @Autowired
    private TraceService traceService;
    
    @PostMapping("/add")
    public R<TraceResponse> add(@RequestParam("tid") Integer tid) {
        TraceResponse traceResponse = traceService.add(tid);
        return R.ok(traceResponse);
    }

}
